<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品列表展示</title>
    <link rel="stylesheet" href="../static/css/bootstrap.css">
</head>
<body>
<!--{{.NowPage}}-->
<!--{{.ShowPage}}-->
<!--{{.Pages}}-->
<form action="/list">
    <label>
        <input type="text" placeholder="商品名称" name="name" class="form-control" value="{{.Name}}" style="width: 300px;">
    </label>
    <button class="btn btn-outline-light" >搜索</button>
</form>

<table class="table">
    <tr>
        <td>商品ID</td>
        <td>商品名称</td>
        <td>商品单价</td>
        <td>商品类型</td>
        <td>商品状态</td>
        <td>商品图片</td>
        <td>商品描述</td>
        <td>商品数量</td>
        <td>操作</td>
    </tr>
    {{range .Data}}
    <tr>
        <td>
            {{.Id}}
        </td>
        <td>
            {{.Name}}
        </td>
        <td>
            {{.Price}}.00
        </td>
        <td>
            {{.TypeId}}
        </td>
        <td>
            {{.Status}}
        </td>
        <td>
            {{.Img}}
        </td>
        <td>
            {{.Desc}}
        </td>
        <td>
            {{.Num}}
        </td>
        <td>
            <a href="/delete">删除</a>
            <a href="/update">修改</a>
        </td>
        {{end}}
    </tr>
</table>
    <p style="text-align: center; ">
        <a href="?page=1&name={{.Name}}">首页</a>
        <a href="?page={{.upPage}}&name={{.Name}}">上一页</a>
        {{range .Fy}}
        <a href="?page={{.Ym}}&name={{.Name}}">{{.Ym}}</a>
        {{end}}
        <a href="?page={{.nextPage}}&name={{.Name}}">下一页</a>

        <a href="?page={{.Pages}}&name={{.Name}}">尾页</a>
    </p>


</body>
</html>